<%@page import="model.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%
	User u =new User();
//kiem tra có phải admin không nếu khong thi redirect home
	if (!u.isAdmin((String) session.getAttribute("lv"))) {
		response.sendRedirect("../index.jsp");
	}
	Actor actor = new Actor();
	/* get info where error */
	String n = ((String)request.getAttribute("n"));
	String m = (String) request.getAttribute("bio");
	String en = ((String)request.getAttribute("en"));
	n = (n==null)? "":n ;
	m = (m==null)? "":m ;
	en = (en==null)? "*":en ;
	
	
%>
<title>MYFILM - Add Actor</title>
		<form action="AddActor" onsubmit="return validate(this)" method="post">
			<fieldset>
				<legend>Add Actor</legend>
				<div>
					<label for="n"> Actor: <span class="required"><%=en %></span></label>
					<input type="text" name="n" value="<%=n %>" size="20" maxlength="150" tabindex="1"/>
				</div>
				<div>
					<label for="bio"  > Bio : </label> 
					<textarea name="bio" rows="3" cols="50" tabindex="2"><%=m %></textarea>
				</div>
			</fieldset>
			<p>
				<input type="submit" name="submit" value="Add Actor" tabindex="3"/>
			</p>
		</form>